#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

int main()
{

	short			req_type = 11;
	int				len = 22;
	int				stk_idx = 1;
	unsigned char	buf[22];
	memset(buf, 0, 22);

	for (int i = 0; i < 22; i+= 2)
		*(short *)(&buf[i]) = req_type;

	short m = *(short *)(&buf[0]);
	printf("%d %d\n", m, req_type);

	const time_t timep = 1308300966;
	struct tm *st = (struct tm *)malloc(sizeof(struct tm));
	memset((void *)st, 0, sizeof(struct tm));
	gmtime_r(&timep, st);
	printf("%d/%d/%d %d:%d:%d\n", st->tm_year + 1900, st->tm_mon + 1, st->tm_mday, \
			st->tm_hour, st->tm_min, st->tm_sec);

	free(st);
	st = NULL;

	return 0;
}
